package eleven;

/**
 * 2586. 统计范围内的元音字符串数
 */
public class Day07 {
    public int vowelStrings(String[] words, int left, int right) {
        int count = 0;
        for(int i = left; i <= right; i++){
            if(isVowel(words[i].charAt(0)) && isVowel(words[i].charAt(words[i].length()-1))){
                count++;
            }
        }
        return count;
    }

    public static boolean isVowel(char c) {
        if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
        return false;
    }

    public static void main(String[] args) {
        String[] words = {"are","amy","u"};
        Day07 day07 = new Day07();
        System.out.println(day07.vowelStrings(words,0,2));
    }
}
